/** COPYRIGHT(C) 2008. Loc Phan. All Rights Reserved.
    A program that generate random number between
    0 - 1000 100 times and print out largest and smallest.
    @author Loc Phan
    @version 1.01 2008-10-28
*/

import java.util.Random;

public class RandomDataAnalyzer
{
   public static void main(String[] args)
   {
      Random rannum = new Random();
      DataSet mySet = new DataSet();
      for(int i=0;i<100;i++)
      {
         mySet.addValue(rannum.nextInt(1000));
      }
      System.out.println("Largest = "+mySet.getLargest());
      System.out.println("Average = "+mySet.getAverage());
   }
}
